package tr.edu.ege.kipler.satisfiability.profile;

import tr.edu.ege.kipler.satisfiability.Reasoner;
import tr.edu.ege.kipler.satisfiability.completion.CompletionStrategy;
import tr.edu.ege.kipler.satisfiability.completion.SHQABoxDepthFirstCompletionStrategy;
import tr.edu.ege.kipler.satisfiability.container.creational.SHQWcsFactory;
import tr.edu.ege.kipler.satisfiability.container.creational.WcsFactory;
import tr.edu.ege.kipler.satisfiability.syntactical.SHIQPreprocessingStrategy;
import tr.edu.ege.kipler.satisfiability.syntactical.SyntacticalProcessingStrategy;

/**
 * 
 * @author İnanç Seylan
 *
 */
public class SHQReasoningProfile implements ReasoningProfile {

	private CompletionStrategy completionStrategy;

	private SyntacticalProcessingStrategy preprocessingStrategy;

	private boolean logging;

	private boolean backjumping;

	public SHQReasoningProfile(Reasoner reasoner, boolean cleanTree) {
		completionStrategy = new SHQABoxDepthFirstCompletionStrategy(reasoner,
				cleanTree);
		preprocessingStrategy = new SHIQPreprocessingStrategy(reasoner);
		backjumping = true;
	}

	public CompletionStrategy getCompletionStrategy() {
		return completionStrategy;
	}

	public SyntacticalProcessingStrategy getPreprocessingStrategy() {
		return preprocessingStrategy;
	}

	public SHQReasoningProfile toggleLogging() {
		logging = !logging;
		return this;
	}

	public boolean isLoggingEnabled() {
		return logging;
	}

	public String getIdentifier() {
		return "SHQ";
	}

	public WcsFactory getWcsFactory() {
		return new SHQWcsFactory();
	}

	public boolean isBackjumpingEnabled() {
		return backjumping;
	}

	public SHQReasoningProfile toggleBackjumping() {
		backjumping = !backjumping;
		return this;
	}

}
